import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/Home'

import Main from '@/views/Main'
import BestBlog from '@/views/BestBlog'
import MessageCenter from '@/views/MessageCenter'
import MyBlog from '@/views/MyBlog'
import Profile from '@/views/Profile'
import Setting from '@/views/Setting'
import Write from '@/views/Write'

Vue.use(Router)

export default new Router({
  routes: [
    { path:'/', component:Home, redirect:'/home' },
    {
      path: '/home',
      name: 'Home',
      component: Home,
      children:[
        { path: '/home', component:Main, name:"Main" },
        { path: '/blog', component:BestBlog, name:"Blog" },
        { path: '/message', component:MessageCenter, name:"Message" },
        { path: '/my_blog', component:MyBlog, name:"My-Blog" },
        { path: '/profile', component:Profile, name:"Profile" },
        { path: '/setting', component:Setting, name:"Setting" },
        { path: '/write', component:Write, name:"Write" },
      ]
    }
  ]
})
